'''
Created on Mar 21, 2012

@author: josh
'''

class BaseAgent():

    def __init__(self):
        pass

    """
    Convenience method to convert gql object to json
    """
    def gql_json_parser(self,query_obj):
        result = []
        for entry in query_obj:
            result.append(dict([(p, unicode(getattr(entry, p))) for p in entry.properties()]))
        return result